<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('主页')" />
</head>

<body class="gray-bg">
	<div class="container-div">
		<div class="col-sm-12 select-table table-striped" shiro:hasPermission="basic:remind:list">
			<table id="bootstrap-table" data-mobile-responsive="true"></table>
		</div>
	</div>
	<th:block th:include="include :: footer" />
	<script th:inline="javascript">
		var prefix = ctx + "basic/remind";

		$(function () {
			var options = {
				url: prefix + "/list",
				search: false,
				showSearch: false,
				showRefresh: true,
				showToggle: false,
				showColumns: false,
				onDblClickRow:function(row){
					detail(row.processId);
				},
				columns: [
					{
						checkbox: true
					},
					{
						field : 'remindId',
						title : '提醒id',
						visible: false
					},
					{
						field: 'userName',
						title: '用户姓名'
					},
					{
						field: 'startDate',
						title: '开始日期'
					},
					{
						field: 'endDate',
						title: '截止日期'
					},
					{
						field: 'remindRemark',
						title: '提醒内容'
					},
					{
						title: '操作',
						align: 'center',
						formatter: function(value, row, index) {
							var actions = [];
							actions.push('<a class="btn btn-primary btn-xs" href="#" onclick="handle(\'' + row.remindId + '\')"><i class="fa fa-edit"></i>标记已处理</a> ');
							return actions.join('');
						}
					}]
			};
			$.table.init(options);
		});

		function handle(remindId) {
			$.modal.confirm("确定该条提醒标记已处理吗？", function() {
				var url = prefix + "/handle/" + remindId;
				$.operate.get(url);
			});
		}
	</script>
</body>
</html>
